import request from '@/utils/request'

// 获取
export const getDepartments = () => request.get('/company/department')
// 修改
export const updateDepartment = data => request({
  url: `/company/department/${data.id}`,
  method: 'PUT',
  data
})
// 新增
export const addDepartment = data => request({
  url: '/company/department',
  method: 'POST',
  data
})
// 删除
export const delDepartment = id => request({
  url: `/company/department/${id}`,
  method: 'DELETE'
})
// 获取详情
export const getDepartmentDetail = id => request({
  url: `/company/department/${id}`
})

